package com.edu.koTA07.takingOrder;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class SplashScreen extends Activity {
	@Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);

	        setContentView(R.layout.splash);
	        final int welcomeScreenDisplay = 10000;
	        Thread welcomeThread = new Thread() {
	 
	            int wait = 0;
	 
	            @Override
	            public void run() {
	                try {
	                    super.run();

	                    while (wait < welcomeScreenDisplay) {
                        sleep(100);
	                        wait += 500;
	                    }
	                } catch (Exception e) {
	                    System.out.println("EXc=" + e);
	                } finally {
	                    startActivity(new Intent(SplashScreen.this,
	                    		Main.class));
	                    finish();
	                }
	            }
	        };
	        welcomeThread.start();	 
	    }
}
